package org.edu.modules.kwgl.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.edu.modules.kwgl.entity.VeJwCjChange;
import org.edu.modules.kwgl.mapper.VeJwCjChangeMapper;
import org.edu.modules.kwgl.service.IVeJwCjChangeService;
import org.edu.modules.scheduleCommon.dto.BasePageDto;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: ve_jw_cj_change
 * @Author: jeecg-boot
 * @Date:   2021-05-12
 * @Version: V1.0
 */
@Service
public class VeJwCjChangeServiceImpl extends ServiceImpl<VeJwCjChangeMapper, VeJwCjChange> implements IVeJwCjChangeService {

    @Override
    public VeJwCjChange getLatestInfoBy2id(int stuid, int ksid) {
        return baseMapper.selectOne(new QueryWrapper<VeJwCjChange>()
                .eq("stuId",stuid).eq("ksId",ksid).last("LIMIT 1"));
    }

    @Override
    public IPage<VeJwCjChange> pageDto(BasePageDto page, Wrapper queryWrapper) {
        return baseMapper.pageDto(page, queryWrapper);

    }
}
